﻿using Sunny.UI;

namespace SunnyUI.Localization.Demo
{
    public class CodeTranslator : BaseCodeTranslator<CodeTranslator>
    {
        /// <summary>
        /// ConfigSection设置CloseInfo在语言文件中的节点为Form1
        /// </summary>
        [ConfigSection("Form1")]
        public string CloseInfo { get; set; }

        /// <summary>
        /// ConfigSection设置HelloWorld在语言文件中的节点为Form2
        /// </summary>
        [ConfigSection("Form2")]
        public string HelloWorld { get; set; }

        /// <summary>
        /// ConfigSection没有设置，AskCaption在语言文件中的节点为CodeLanguage
        /// </summary>
        public string AskCaption { get; set; }

        /// <summary>
        /// ConfigSection没有设置，InfoCaption在语言文件中的节点为CodeLanguage
        /// </summary>
        public string InfoCaption { get; set; }

        public override void SetDefault()
        {
            base.SetDefault();
            CloseInfo = "您确认要退出程序吗？";
            HelloWorld = "你好世界！";
            AskCaption = "询问";
            InfoCaption = "提示";
        }
    }
}
